Ext.define('Lms.main.MainPanel', {
	extend : 'Ext.tab.Panel',
	initComponent : function(){
		Ext.apply(this, {
			id : 'mainPanel',
			region : 'center',
//			tabWidth : 100,
			resizeTabs:false,
			activeTab : 0,
			deferredRender : true,
//			margins : '5 5 5 0',
			border : true,
			items : [
				Ext.create('Lms.rms.SystemSummaryPanel')
			]
		});
		this.callParent(arguments);
		this.on('add',function(panel, component, index, eOpts){
			this.getLayout().setActiveItem(component.getId());
			this.doLayout();
		},this);
	},
	
	/**
	 * MainPanel 변경
	 */
	changeMainPanel : function(panelId){
		if(!this.queryById(panelId)){
				this.add(Ext.create('Lms.rms.'+panelId));
		}else{
			this.getLayout().setActiveItem(panelId);
		}
	}
});